package com.bootdo.clouddo.service.juejin.impl;

import java.util.List;

import org.apache.ibatis.session.RowBounds;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.bootdo.clouddo.dao.juejin.ArticleCollectionDao;
import com.bootdo.clouddo.domain.juejin.ArticleCollectionDO;
import com.bootdo.clouddo.service.juejin.IArticleCollectionService;


@Service
public class ArticleCollectionServiceImpl implements IArticleCollectionService {

	
	@Autowired
	private ArticleCollectionDao collectionDao;

	@Override
	public int save(ArticleCollectionDO record) {
		return collectionDao.insertSelective(record);
	}

	@Override
	public List<ArticleCollectionDO> findByUserId(Long userId, String channel) {
		return collectionDao.findByUserId(userId);
	}

	@Override
	public int deleteByUidAndAid(Long userId, String aId) {
		return collectionDao.deleteByUidAndAid(userId, aId);
	}
	
	@Override
	public ArticleCollectionDO findByUidAndAid(Long userId, String aId) {
		return collectionDao.findByUidAndAid(userId, aId);
	}
	
	
}
